# Copyright 2025 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

module(
    name = "zetasql_bazel_example",
)

# You may use local_path_override (if you download the ZetaSQL project into a local directory), or
# archive_override (if you want to use the ZetaSQL project without downloading it).
bazel_dep(name = "zetasql")
local_path_override(
    module_name = "zetasql",
    path = "../..",
)

bazel_dep(name = "abseil-cpp", version = "20240722.1", repo_name = "absl")
bazel_dep(name = "googletest", version = "1.17.0")

single_version_override(
    module_name = "abseil-cpp",
    version = "20240722.1",
)

# Dev dependency.
bazel_dep(name = "toolchains_llvm", version = "1.5.0", dev_dependency = True)

llvm = use_extension("@toolchains_llvm//toolchain/extensions:llvm.bzl", "llvm", dev_dependency = True)
llvm.toolchain(
    name = "llvm_toolchain",
    llvm_versions = {
        "": "21.1.0",
        "darwin-x86_64": "19.1.7",
        "darwin-aarch64": "19.1.7",
    },
)
use_repo(llvm, "llvm_toolchain")

register_toolchains(
    "@llvm_toolchain//:all",
    dev_dependency = True,
)
